@import 'variables';

.van-cell-group {
  background-color: $cell-group-background-color;

  &__title {
    padding: $cell-group-title-padding;
    color: $cell-group-title-color;
    font-size: $cell-group-title-font-size;
    line-height: $cell-group-title-line-height;
  }
}

.van-cell {
  position: relative;
  display: flex;
  box-sizing: border-box;
  height: 100%;
  padding: $cell-horizontal-padding $cell-vertical-padding;
  overflow: hidden;
  color: $cell-text-color;
  font-size: $cell-font-size;
  line-height: $cell-line-height;
  background-color: $cell-background-color;

  &:not(:last-child)::after {
    position: absolute;
    box-sizing: border-box;
    content: ' ';
    pointer-events: none;

    right: 0;
    bottom: 0;
    top: $padding-md;
    border-left: 1px solid $cell-border-color;
    transform: scaleX(0.5);
  }

  &--borderless::after {
    display: none;
  }

  &__label {
    margin-top: $cell-label-margin-top;
    color: $cell-label-color;
    font-size: $cell-label-font-size;
    line-height: $cell-label-line-height;
  }

  &__title,
  &__value {
    flex: 1;
  }

  &__value {
    position: relative;
    overflow: hidden;
    color: $cell-value-color;
    text-align: right;
    vertical-align: middle;

    &--alone {
      color: $text-color;
      text-align: left;
    }
  }

  &__left-icon,
  &__right-icon {
    min-width: 1em;
    width: $cell-line-height;
    font-size: $cell-icon-size;
    line-height: $cell-line-height;
  }

  &__left-icon {
    margin-right: 5px;
  }

  &__right-icon {
    padding: 5px;
    color: $cell-right-icon-color;
  }

  &--clickable {
    &:active {
      background-color: $cell-active-color;
    }
  }

  &--required {
    overflow: visible;

    &::before {
      position: absolute;
      left: $padding-xs;
      color: $cell-required-color;
      font-size: $cell-font-size;
      content: '*';
    }
  }

  &--center {
    align-items: center;
  }

  &--large {
    padding-top: $cell-large-vertical-padding;
    padding-bottom: $cell-large-vertical-padding;

    .van-cell__title {
      font-size: $cell-large-title-font-size;
    }

    .van-cell__label {
      font-size: $cell-large-label-font-size;
    }
  }
}
